
class MemberRemoteInfo {
    var groupID = ""
    var mute = 0
    var osnID = ""
    var type = 0
    
    static func fromJson(_ json:[String:Any]) -> [MemberRemoteInfo] {
        var ms:[MemberRemoteInfo] = []
        guard let members = json["userList"] as? [[String:Any]] else {return ms}
        for m in members {
            let u = MemberRemoteInfo()
            u.groupID = m["groupID"] as? String ?? ""
            u.mute = m["mute"] as? Int ?? 0
            u.osnID = m["osnID"] as? String ?? ""
            u.type = m["type"] as? Int ?? 0
            ms.append(u)
        }
        return ms
    }
}
class MemberZoneInfo {
    var userList:[MemberRemoteInfo] = []
    var size = 0
    var groupID = ""
    var memberCount = 0
    var name = ""
    var begin = 0
    
    static func fromJson(_ json:[String:Any]) -> MemberZoneInfo? {
        let u = MemberZoneInfo()
        u.userList = MemberRemoteInfo.fromJson(json)
        u.size = json["size"] as? Int ?? 0
        u.groupID = json["groupID"] as? String ?? ""
        u.memberCount = json["memberCount"] as? Int ?? 0
        u.name = json["name"] as? String ?? ""
        u.begin = json["begin"] as? Int ?? 0
        return u
    }
}
